// 消息/粉丝列表
import { get, post } from '@/server/http';

// 消息/粉丝列表
export const getFanListAPI = (userId) => get(`user/${userId}/Fans/page/1/${userId}`);

// 消息/ 粉丝列表 关注||取消关注
export const followAPI = (userId, followUserId) => get(`user/${userId}/triggerFollow/${followUserId}`);


// 消息/点赞列表
export const getLikeListAPI = (userId) => get(`user/${userId}/byLike/page/1`);

// 消息/ @我的 列表
export const getAtMyListAPI = (userId) => get(`user/${userId}/getAt/page/1`);

// 消息/评论列表
export const getCommentListAPI = (userId) => get(`user/${userId}/byComment/page/1`);

// 消息/ 聊天列表
export const getChatListAPI = (userId, chatId) => get(`user/${userId}/getPrivateLetter/${chatId}`);

// 消息/ 聊天列表 发送消息
export const sendMessageAPI = (fromUserId, toUserId, content) => {
  return post(`/user/${fromUserId}/privateLetter/${toUserId}`, {
    content,
    fromUserId,
    toUserId
  })
}
